<!DOCTYPE html>
<html    xmlns:th="http://www.thymeleaf.org">

<head th:replace="comm/common :: header(~{::title},~{},~{})">
    <title>编辑资源</title>
</head>

<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight" style="padding:0px;">
    <div class="row">
        <div style="width: 100%">
            <div class="ibox">
                <div class="ibox-content">
                    <form id="roleFormAdd"  class="wizard-big">
                        <input type="hidden" th:value="${res.id}" name="parentId"/>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">父级资源：</label>
                            <div class="col-sm-2">
                                <input  minlength="2" type="text" th:value="${res.name}" class="form-control" disabled>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">资源名称：</label>
                            <div class="col-sm-2">
                                <input id="" name="name" minlength="2" th:value="${res.name}" type="text" class="form-control" required="" aria-required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">资源地址：</label>
                            <div class="col-sm-2">
                                <input id="resUrl" type="text" class="form-control" name="resUrl" th:value="${res.resUrl}" required="" aria-required="true">
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">资源类型：</label>
                            <div class="col-sm-2">
                                <label class="radio-inline i-checks">
                                    <input type="radio" checked="${res.type == 1}" value="menu" name="type"> <i></i> 菜单</label>
                                <label class="radio-inline i-checks">
                                    <input type="radio" checked="${res.type == 2}" value="button" name="type"> <i></i> 按钮</label>
                                <label class="radio-inline i-checks">
                                    <input type="radio" checked="${res.type == 3}" value="api" name="type"> <i></i> 接口</label>
                            </div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">资源状态：</label>
                            <div class="col-sm-2">
                                <label class="radio-inline i-checks">
                                    <input type="radio" checked value="1" name="status"> <i></i> 正常</label>
                                <label class="radio-inline i-checks">
                                    <input type="radio" value="2" name="status"> <i></i> 锁定</label>
                            </div>
                        </div>
                        <div class="form-group" style="text-align: center">
                            <div class="col-sm-4 col-sm-offset-3">
                                <button id="addAuthSubmit" class="btn btn-block btn-primary">保存</button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<div th:replace="comm/common :: bottom"></div>
<script th:src="@{/admin/res/edit_res.js}" ></script>

</body>

</html>
